home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15368 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: news.cern.ch!danpop
  2. From: danpop@mail.cern.ch (Dan Pop)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: May fprintf () be recursive?
  5. Date: 18 Apr 96 17:46:49 GMT
  6. Organization: CERN European Lab for Particle Physics
  7. Message-ID: <danpop.829849609@news.cern.ch>
  8. References: <4l5f9s$ad3@news.cs.tu-berlin.de> <4l5pdi$d8q@news.cs.tu-berlin.de>
  9. NNTP-Posting-Host: ues5.cern.ch
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=US-ASCII
  12. Content-Transfer-Encoding: 7bit
  13. X-Newsreader: NN version 6.5.0 #18 (NOV)
  14.  
  15. In <4l5pdi$d8q@news.cs.tu-berlin.de> ulrich@cs.tu-berlin.de (Ulrich Wittenberg) writes:
  16.  
  17.  
  18. >As was pointed out to me, it's not a recursion, but a nested/reentrant
  19. >call of fprintf, that seems to wreak havoc. 
  20.  
  21. It's _not_ nested and it's _not_ reentrant.  There are two independent 
  22. fprintf calls, the only connection between them being that the outer one
  23. uses the value returned by the inner one as argument.  There is even a 
  24. sequence point between the return of the inner fprintf and the invocation
  25. of the outer fprintf.
  26.  
  27. >The question remains: Is
  28. >is legal to call fprintf from within another fprintf?
  29.  
  30. The answer remains: Yes, it's perfectly legal.
  31.  
  32. Dan
  33. --
  34. Dan Pop
  35. CERN, CN Division
  36. Email: danpop@mail.cern.ch 
  37. Mail:  CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
  38.